package com.bitnei.battery.examples;

import com.bitnei.battery.bean.dataBean.replace.RepRecord;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wang
 * @Date: 2019/10/16 10:18
 * @Version 1.0
 * Description: 换电记录示例
 */
public class RepRecordExample {

    public static void main(String[] args){
        //请求地址
        String url = "http://127.0.0.1:8999/bitnei/v1.0/battery/replaceBattery/replacementBattery";
        //组装数据
        List<RepRecord> recordList = mockRepRecord();
        //调用接口
        ApiUtilExample.callApi(url,recordList);
    }


    /**
     * 模拟换电记录数据
     * @return
     */
    private static List<RepRecord> mockRepRecord(){
        List<RepRecord> recordList = new ArrayList<>();

        RepRecord record = new RepRecord();
        record.setVin("DHXJR52DHXS116030");
        record.setNewCode("DHXMB2258561BBB4E001B030");
        record.setOldCode("DHXMB2258561BBB4E001B031");
        record.setReplaceDate("2018-04-10");
        record.setReplaceUnitCode("91430111MA4L16XXXX");
        record.setReplaceUnitName("回收网点企业");
        recordList.add(record);
        return recordList;
    }
}
